﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Storage;
using System.IO;
using System.Text;

namespace Megaman
{
    class Scene
    {
        public List<Scene> Scenes;
        public ContentManager content;
        public String basePath;
        public int scene;
        public Background background;

        public Scene(ContentManager content, string basePath,int scene, Background background)
        {
            this.scene = scene;
            this.content = content;
            this.background = background;
            for (int i = 0; i < background.getMaxViews(); i++)
            {
                if(viewExists(i))
                    Scenes.Add(new View(content, basePath + "//" + scene, i, background));
            }
        }
        public bool viewExists(int view)
        {
            string path = String.Format(basePath + "/Background/"+scene+"/"+view);
            path = Path.Combine(StorageContainer.TitleLocation,"Content/"+path);
            return Directory.Exists(path);

        }

        public void Draw(SpriteBatch sp, Vector2 pos)
        {
        }
    }
}
